package com.flyan.game.motafx.ui;

import com.almasb.fxgl.dsl.FXGL;
import com.flyan.game.motafx.config.GameConfig;
import javafx.geometry.Pos;
import javafx.scene.layout.HBox;
import javafx.scene.layout.TilePane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;

/**
 * 控制台状态栏
 *
 * @author flyan
 * @version 1.0
 * @email flyan_by_chenu@sina.com
 * @since 2025/2/1
 */
public class ConsolePane extends HBox {

    private Text text = new Text();

    public ConsolePane() {
        setStyle("-fx-background-color: lightgray");
        setPrefSize(FXGL.getAppWidth(), GameConfig.CONSOLE_HEIGHT);
        setTranslateX(GameConfig.CONSOLE_COORDINATE.getX());
        setTranslateY(GameConfig.CONSOLE_COORDINATE.getY());
        setAlignment(Pos.TOP_LEFT);

        text.setText("这是控制台，你可以在这里查看游戏事件以及游戏信息~");
        getChildren().add(text);
    }

    public Text getText() {
        return text;
    }

}
